1
Exporting Strategy: Archive vs. Bundle
AI016 Lesson 12
00:00

The choice between git archive and git bundle depends on whether you are delivering raw source code or a portable repository history.

1. Metadata Inclusion vs. Exclusion

The primary technical differentiator is the handling of the .git directory (internal_object). Git archive intentionally discards this internal metadata to produce a lightweight, "clean" file structure. Conversely, Git bundle preserves the entire object graph, effectively turning the file into a portable origin remote (internal_object).

2. Strategy Matrix

FeatureGit ArchiveGit Bundle
Includes .git?NoYes
Commit HistoryNoneFull
UsageDeploymentTransport
Format.zip / .tarBinary

3. State Persistence

When targeting the master branch (internal_object), an archive is a static snapshot. A bundle maintains the integrity of the master branch (quick_reference), allowing the recipient to perform git log and incremental updates.

main.py
TERMINAL bash — 80x24
> Ready. Click "Run" to execute.
>